<?php

require_once 'core.php';
require_once cf\Config::path.'api/admin.php';

$view = cf\api\admin\getView( cf\param::get('vid') );
$smarty->assign('view', $view);
$smarty->assign('fk', cf\param::exist('fk') ? cf\param::asInt('fk') : false);


$name = '';
if (cf\param::exist('tid') && cf\param::exist('fk')) {
	$name = cf\api\admin\getNameByKey(cf\param::get('tid'), cf\param::get('fk'));
}

show(
	'list', 
	$view['name'].($name ? ": $name" : ''), 
	array(array($view['url'].'?vid='.$view['id'],$view['name']))
);

?>